EPS Fixer is a small utility that allows you to view the PICT preview resources that are present in most Macintosh EPSF (Encapsulated PostScript) files. If for some reason no PICT resource is present, then EPS Fixer will try to create one. Starting with version 1.1 of the software, you can paste or drag pictures into EPS Fixer windows to create a preview resource. As of version 1.2, EPS Fixer can read PICT files and use the contents as the preview. EPS Fixer will also allow you to correct any discrepancies between the boundary of the PICT preview and the bounding box information within the PostScript data. Finally, EPS Fixer can change the file types between ╘TEXT╒ and ╘EPSF╒ to simplify importing EPSF files into word processing or desktop publishing programs. These options are described in greater detail below.
System Requirements:
EPS Fixer requires a Macintosh running System 7.0 or later. EPS Fixer supports Macintosh Drag and Drop and AppleScript. In addition, Balloon Help is available for the various menu items. Version 1.2 and later include Apple Guides for users running System 7.5. If you are using System 7.1 or earlier, you can delete these files.
The Power Macintosh version of the application now ships as a fat binary which runs natively on both 68k and Power Macintoshes. The change to a fat binary is to help users of PPC upgrade cards.
Power Macintosh Notes:
To use the fat version of EPS Fixer on a Power Macintosh, you must have the ▐le named ╥ObjectSupportLib╙ in your Extensions folder. This is a shared library that is part of the AppleScript distribution that comes with your Power Mac system software. The shared library is located in the following folder if you are installing from the System 7.1 distribution:
Apple Extras:AppleScript 1.1:AppleScript¬Setup:Apple's Scripting System:RISC Support.
ObjectSupportLib can be found in a similar location in the System 7.5 distribution. If the ObjectSupportLib is completely unavailable, you must run the 68k version.
Background Information
EPSF files are PostScript files that contain bounding box information that a page layout program can use when importing the file. A valid EPSF file must contain the following two lines:
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 1 1 200 300
The numbers following "EPSF" and the bounding box may be different than
that shown above. Besides the bounding box, these files may also contain PostScript preview information that can be used to display the file. This PostScript preview is usually a bitmap written as text. EPSF files created on a Macintosh can contain a ╘PICT╒ preview resource along with the PostScript preview. The ╘PICT╒ preview allows a Macintosh program to rapidly display the image without needing a PostScript interpreter.
Several people have asked me if EPS Fixer can convert normal PostScript ▐les to Encapsulated PostScript ▐les. Not yet, but this is a possibility in future releases.
Viewing and Creating the PICT Resource
When EPS Fixer opens an EPSF file, it will immediately try to display the PICT resource. If no PICT resource is present, then the program will attempt to create one by reading the PostScript preview data in the file. If the PostScript information does not contain preview information in a readable format, EPS Fixer will create a place-holder that has the proper dimensions. Saving a file after displaying it will save the PICT resource without modifying any of the PostScript information in the file.
Of the various types of PostScript previews within an EPSF file, the ones that EPS Fixer can read are marked by the following strings:
%%BeginPreview:
%%Note: Object
%%BeginBinary:
The three strings listed above denote three different preview formats. Of these formats, the first is the one most likely to be handled correctly by EPS Fixer. The other two are not strictly EPSF previews, but are used by the PostScript interpreter when printing the file. If EPS Fixer finds a preview that it cannot read, it will create a place-holder PICT resource. The place-holder resource is simply a box containing the name of the EPSF file.
EPS Fixer displays a floating status window that lists the coordinates of the bounding box and the PICT preview for the front most window. This status window also gives information on what EPS Fixer was able to accomplish when it was reading the file.
Starting with version 1.2, EPS Fixer allows you to create a PICT preview from an existing PICT ▐le. To do this, open the EPS ▐le, and then select Insert PICT╔ from the File menu.
Fixing the Bounding Box
Some Macintosh programs create EPSF files that have bounding boxes that do not agree with the PICT resource they insert into the file. The menu items under the ╥Fix╙ menu will correct this. The ╥Set Bounding Box to PICT╙ menu item will set the bounding box coordinates to the PICT coordinates. The ╥Set PICT to Bounding Box╙ item will adjust the PICT resource so that it matches the bounding box.
Changing the File Type
EPS Fixer will also change file types between ╘TEXT╒ and ╘EPSF╒. These conversions are available in the file menu.
Drag and Drop Support
EPS Fixer supports the Macintosh Drag Manager, which allows you to drag a preview to a drag savvy application without using the clipboard. This will work if you have installed the Macintosh Drag and Drop extension, or if you are using System 7.5 or later. To drag a preview, click on the picture, and without releasing the mouse button, drag the preview to the Finder or to another application that supports Drag and Drop. In versions 1.1 or later of EPS Fixer, you can drag a picture from another application into an EPS Fixer window. This new picture will become the preview resource. You may need to adjust the rectangle of the PICT resource to match the bounding box. There are options in the ╥Fix╙ menu to do this.
Note: Although SimpleText can display normal PICT files and supports Drag and Drop, it won╒t let you drag a PICT file.
Preferences
The preferences dialog is available from the Edit menu. It allows you to set the following options:
Show Status Window on Startup: If this box is checked, the status window will be displayed every time the program starts up.
Always Check for Text Preview: If this option is check, EPS Fixer will always look for the text preview, even if a PICT preview has been found. Leaving this box unchecked will make the program faster if the file already has a PICT preview, but will cause some of the information to be incorrect if you are using AppleScript to determine whether or not the ▐le has a text preview. If you are not using AppleScript to do this, leave this box unchecked.
Upon Opening an EPSF File╔ This allows you to automate the adjustments between the PICT rectangle and the EPS bounding box. EPS Fixer will perform the selected action every time it opens an EPS ▐le.
Upon Modifying a PICT Resource╔ This also allows you to automate the adjustments between the PICT rectangle and the EPS bounding box. EPS Fixer will perform the selected action every time the PICT preview is pasted or dragged from an outside source. Note: If you use the ╥set preview to xxx╙ command in AppleScript, the rectangles will not be modi▐ed automatically. You will need to use the ╥set PICT rectangle to bounding box╙ or ╥set bounding box to PICT rectangle╙ commands.
I Have Registered: If you have registered the software, check this box to keep the opening splash screen from appearing.
AppleScript Support
AppleScript support has been improved in version 1.5. Every action possible, including changing and reading the preference settings, is now scriptable. In addition, most actions are now recordable. Sample scripts and documentation are available in the ╥Scripting EPS Fixer╙ folder. Among the sample scripts is a ╥droplet╙ which allows you to create the preview resource without explicitly opening and saving the EPSF file. If you drop a group of files on the droplet, EPS Fixer will process each file in turn. The first time you use this droplet, it may ask for the location of EPS Fixer. If this occurs, open the script in the script editor, and then save it to keep this from happening again.
Limitations
EPS Fixer will correctly display color PICT previews, but will not create them.
Printing will only send the PICT preview to the printer. Future versions will be able to send the PostsScript data to PostScript printers.
Future Plans
These depend on the shareware response. If you like the software, and send me suggestions, I will try to implement them. Next on the list is to add color support when creating the PICT previews. As stated earlier, if a color PICT already exists, the program will display it correctly. However, EPS Fixer cannot create them yet.
Acknowledgements, etc╔
I wrote this program using Metrowerks╒ CodeWarrior C++ compiler and the PowerPlant class library. PowerPlant made including the support for both AppleScript and Drag and Drop unbelievably painless.
CodeWarrior and PowerPlant are trademarks of Metroworks Inc.
PostScript¬ is a trademark of Adobe Systems Inc.
AppleScript¬ is a trademark of Apple Computer
Shareware Information
If you decide to use this software for more than 30 days, please pay me for it. Single machine licenses are $10. Site licenses are available at a cost of $10 for the first machine, $7 for each machine thereafter. Please contact me if you would like a site license. We can probably work something out. Upgrades, if there are any, are free. You can use the form at the end of this documentation to register. Please include any changes or enhancements you would like to see in the next version of the software. If you choose not to register, please let me know why.
Please register if you haven╒t already.
Legal Stuff
This software is ⌐1994 by David C. Schooley.
This software is offered as is. The author makes no warranty regarding the usefulness or usability of this software. The liability of the author for any damages resulting from the use of this software is limited to the registration cost of one copy of the software, regardless of the form of the claim. The author accepts no liability whatsoever if the shareware fee has not been paid.
Please copy and distribute this software by way of every method possible. However you must:
Keep the program and its accompanying documentation and auxiliary files together.
Obtain written permission from the author if any fee is to be charged for the distribution of this software. You may also obtain permission via EMAIL.
Contacting the author:
Please submit bug reports, feature requests, etc╔, to